package com.cms.recursoshumanos.facade;

import com.cms.recursoshumanos.constant.Constant;
import com.cms.recursoshumanos.handler.WServiceCall;
import com.cms.recursoshumanos.json.me.JSONParser;
import com.cms.recursoshumanos.json.object.JsonObjectGetCantVacaciones;

public class CantVacacionesDiaFacade
{
	private String strUser;
	private String strPass;

	public CantVacacionesDiaFacade( String user,String password)
	{
		this.strUser=user;
		this.strPass=password;
		
	}
	
	
	public String enviarSolicitud1() 
	{
		JSONParser jParser = new JSONParser();
		return setValores(jParser.
						getJSONFromUrl(
								Constant.URL_WEBSERVICE, 
								WServiceCall.getInstance().getVacaciones(strUser, strPass)));
        
	}
	public String enviarSolicitud() 
	{
		JSONParser jParser = new JSONParser();
		return jParser.
						setPetitionToUrl(
								Constant.URL_WEBSERVICE, 
								WServiceCall.getInstance().getVacaciones(strUser, strPass));
        
	}
	
	public String setValores(String strResult)
	{
		JsonObjectGetCantVacaciones.getInstance().fromJSON(strResult);
		return JsonObjectGetCantVacaciones.getInstance().getResultProceso();	
	}
	


	
}
